# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-json-logger
pkgver=2.0.7
pkgrel=2
pkgdesc='A python library adding a json log formatter'
arch=('any')
license=('BSD')
url='https://github.com/madzak/python-json-logger'
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://github.com/madzak/python-json-logger/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('b6bdeec2a01257255cd79a7315d01125b2d40fca9fd2cfd2a8beed68ab58aaf1a85e0946c56979904b81341bdaf95f6c879b5661cdd7a17f120a04fa0c0db489')

build() {
  cd python-json-logger-$pkgver
  python setup.py build
}

check() {
  cd python-json-logger-$pkgver
  PYTHONPATH=src pytest
}

package() {
  cd python-json-logger-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

# vim:set ts=2 sw=2 et:
